package com.scm.service;

import com.scm.dao.ProductMapper;
import com.scm.pojo.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @ClassName ProductService
 * @Description TODO
 * @Author Xu
 * @Date 2021/7/8 15:25
 * @Version 1.0
 **/
@Service
public class ProductService implements ProductMapper {

    @Autowired
    private ProductMapper productMapper;
    @Override
    public List<Product> getAllProduct() {
        return productMapper.getAllProduct();
    }

    @Override
    public int countAll() {
        return productMapper.countAll();
    }

    @Override
    public List<Product> findAllProduct(Map<String, Object> params) {
        return productMapper.findAllProduct(params);
    }

    @Override
    public List<Product> findProduct(String id) {
        return productMapper.findProduct(id);
    }

    @Override
    public void deleteProduct(String productCode) {
        productMapper.deleteProduct(productCode);
    }

    @Override
    public Product getProduct(String productCode) {
        return productMapper.getProduct(productCode);
    }

    @Override
    public void updateProduct(Product product) {
        productMapper.updateProduct(product);
    }

    @Override
    public void addProduct(Product product) {
        productMapper.addProduct(product);
    }

    @Override
    public Product getNameProduct(String name) {
        return productMapper.getNameProduct(name);
    }

    @Override
    public void setPoNum(String poNum, String productCode) {
        productMapper.setPoNum(poNum,productCode);
    }

    @Override
    public String getProductName(String productCode) {
        return productMapper.getProductName(productCode);
    }

    @Override
    public void flushPoNum(String poNum, String productCode) {
        productMapper.flushPoNum(poNum,productCode);
    }

    @Override
    public void flushSoNum(String soNum, String productCode) {
        productMapper.flushSoNum(soNum,productCode);
    }

    @Override
    public void putStorage(String num, String productCode) {
        productMapper.putStorage(num,productCode);
    }

    @Override
    public void outStorage(String num, String productCode) {
        productMapper.outStorage(num,productCode);
    }

    @Override
    public List<Product> selectProduct(String productCode, String name) {
        return productMapper.selectProduct(productCode,name);
    }

    @Override
    public void augmentProduct(String num, String productCode) {
        productMapper.augmentProduct(num,productCode);
    }

    @Override
    public void reduceProduct(String num, String productCode) {
        productMapper.reduceProduct(num,productCode);
    }
}
